1. Field of Invention
The invention relates generally to computer systems. More particularly, methods and apparatus for managing a lifecycle of a resource adapter by an associated application server.
2. Description of Relevant Art
In modern Enterprise Information Systems (EIS) is formed to include a number of EIS resources. An EIS resource provides EIS-specific functionality to its clients examples of which include a record or set of records in a database system, a business object in an ERP system, and a transaction program in a transaction processing system. Generally, an EIS is formed of a number of interconnected personal computers, workstations, mainframes, and the like along with other devices such as large mass storage subsystems, network interfaces, as well as interfaces to the public telephony systems are interconnected providing an integrated environment in which information may be shared among the various users. Typically, users may be performing a variety of operations, including order receipt, manufacturing, shipping, billing, inventory control, and other operations in which sharing of data on a real time basis provides a significant advantage over, for example, maintaining separate records and attempting to reconcile them later.
The Java™ 2 Platform, Enterprise Edition (J2EE™) provides containers for client applications, web components (based on servlets, Java ServerPages™) and Enterprise JavaBeans™ components. These containers provide deployment and runtime support for application components as well as an integrated view of the services provided by underlying application server for the associated application components. Containers can run on existing systems such as, for example, web servers (for the web containers) application servers, TP monitors, and database systems for EJB containers enabling EISs to leverage both the advantages of their existing systems and those of J2EE™. For example, EISs can write (or rewrite) new applications using J2EE™ capabilities and can also encapsulate parts of existing applications in Enterprise JavaBeans™ (EJB), Message Driven Beans (MDB), Java ServerPages™ (JSP) or Servlets. IN addition, EIS applications access functions and data associated with applications running on Enterprise Information Systems (EIS).
The J2EE™ Connector architecture defines standard contracts which allows bi-directional connectivity between enterprise applications and EISs. An architecture for integration of J2EE™ servers with EISs is referred to as a connector architecture. There are two parts to the connector architecture: an EIS vendor-provided resource adapter and an application server that allows this resource adapter to plug in. The contracts support bi-directional communication between the application server and the resource adapter.
In the context of this discussion, a resource adapter is a system-level software driver that is used by a Java™ application to connect to an EIS. When a resource adapter is deployed (or during application server startup), an application server needs to bootstrap an instance of the resource adapter in an appropriate address space. When a resource adapter is undeployed (or during application server shutdown), the application server must notify the resource adapter instance to stop functioning accordingly so that it can be safely unloaded.
Therefore, what is needed is a lifecycle management mechanism that provides a mechanism for an application server to manage the lifecycle of a resource adapter instance. This allows an application server to bootstrap a resource adapter instance during resource adapter deployment or application server startup and also to expose some of its useful facilities to the resource adapter instance. It also provides a mechanism to notify the resource adapter instance to stop functioning while it is being undeployed or during an orderly shutdown of the application server.